
<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
	<title> 页面名称 </title>
<style type="text/css">
#div {
	height: 200px; width: 200px; border: 1px solid red;
}
#div.blue {
	border-color: blue;
}
</style>
</head>
<body>
<script type="text/javascript" src="http://libs.baidu.com/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript">
$(function() {
	$("#div").click(function() {
		$(this).toggleClass("blue");
	});
});
</script>
<div id="div"></div>

</script>
</body>
</html>